3.337 \(\int \cot ^3(c+d x) (a+b \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \, dx\)

Optimal. Leaf size=220 \[ \frac{\sqrt{a} \left (8 a^2 A-20 a b B-15 A b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{4 d}-\frac{(a-i b)^{5/2} (A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d}-\frac{(a+i b)^{5/2} (A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d}-\frac{a (4 a B+7 A b) \cot (c+d x) \sqrt{a+b \tan (c+d x)}}{4 d}-\frac{a A \cot ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{2 d} \]

[Out]

(Sqrt[a]*(8*a^2*A - 15*A*b^2 - 20*a*b*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a]])/(4*d) - ((a - I*b)^(5/2)*(
A - I*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]])/d - ((a + I*b)^(5/2)*(A + I*B)*ArcTanh[Sqrt[a + b*Ta
n[c + d*x]]/Sqrt[a + I*b]])/d - (a*(7*A*b + 4*a*B)*Cot[c + d*x]*Sqrt[a + b*Tan[c + d*x]])/(4*d) - (a*A*Cot[c +
 d*x]^2*(a + b*Tan[c + d*x])^(3/2))/(2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.927036, antiderivative size = 220, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 8, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.242, Rules used = {3605, 3645, 3653, 3539, 3537, 63, 208, 3634} \[ \frac{\sqrt{a} \left (8 a^2 A-20 a b B-15 A b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{4 d}-\frac{(a-i b)^{5/2} (A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d}-\frac{(a+i b)^{5/2} (A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d}-\frac{a (4 a B+7 A b) \cot (c+d x) \sqrt{a+b \tan (c+d x)}}{4 d}-\frac{a A \cot ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^3*(a + b*Tan[c + d*x])^(5/2)*(A + B*Tan[c + d*x]),x]

[Out]

(Sqrt[a]*(8*a^2*A - 15*A*b^2 - 20*a*b*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a]])/(4*d) - ((a - I*b)^(5/2)*(
A - I*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]])/d - ((a + I*b)^(5/2)*(A + I*B)*ArcTanh[Sqrt[a + b*Ta
n[c + d*x]]/Sqrt[a + I*b]])/d - (a*(7*A*b + 4*a*B)*Cot[c + d*x]*Sqrt[a + b*Tan[c + d*x]])/(4*d) - (a*A*Cot[c +
 d*x]^2*(a + b*Tan[c + d*x])^(3/2))/(2*d)

Rule 3605

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e
_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((b*c - a*d)*(B*c - A*d)*(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e
+ f*x])^(n + 1))/(d*f*(n + 1)*(c^2 + d^2)), x] - Dist[1/(d*(n + 1)*(c^2 + d^2)), Int[(a + b*Tan[e + f*x])^(m -
 2)*(c + d*Tan[e + f*x])^(n + 1)*Simp[a*A*d*(b*d*(m - 1) - a*c*(n + 1)) + (b*B*c - (A*b + a*B)*d)*(b*c*(m - 1)
 + a*d*(n + 1)) - d*((a*A - b*B)*(b*c - a*d) + (A*b + a*B)*(a*c + b*d))*(n + 1)*Tan[e + f*x] - b*(d*(A*b*c + a
*B*c - a*A*d)*(m + n) - b*B*(c^2*(m - 1) - d^2*(n + 1)))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f
, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 1] && LtQ[n, -1] && (Inte
gerQ[m] || IntegersQ[2*m, 2*n])

Rule 3645

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*t
an[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[((A*d^2 + c*(c*C - B*d))*(a + b*T
an[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(d*f*(n + 1)*(c^2 + d^2)), x] - Dist[1/(d*(n + 1)*(c^2 + d^2)), I
nt[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^(n + 1)*Simp[A*d*(b*d*m - a*c*(n + 1)) + (c*C - B*d)*(b*c
*m + a*d*(n + 1)) - d*(n + 1)*((A - C)*(b*c - a*d) + B*(a*c + b*d))*Tan[e + f*x] - b*(d*(B*c - A*d)*(m + n + 1
) - C*(c^2*m - d^2*(n + 1)))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c -
a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] && LtQ[n, -1]

Rule 3653

Int[(((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (
f_.)*(x_)]^2))/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/(a^2 + b^2), Int[(c + d*Tan[e + f*
x])^n*Simp[b*B + a*(A - C) + (a*B - b*(A - C))*Tan[e + f*x], x], x], x] + Dist[(A*b^2 - a*b*B + a^2*C)/(a^2 +
b^2), Int[((c + d*Tan[e + f*x])^n*(1 + Tan[e + f*x]^2))/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e,
f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] &&  !GtQ[n, 0] &&  !LeQ[n, -
1]

Rule 3539

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rule 3537

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c*
d)/f, Subst[Int[(a + (b*x)/d)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 3634

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.)*((A_) + (C_.)*
tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[A/f, Subst[Int[(a + b*x)^m*(c + d*x)^n, x], x, Tan[e + f*x]], x]
 /; FreeQ[{a, b, c, d, e, f, A, C, m, n}, x] && EqQ[A, C]

Rubi steps

\begin{align*} \int \cot ^3(c+d x) (a+b \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \, dx &=-\frac{a A \cot ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{2 d}+\frac{1}{2} \int \cot ^2(c+d x) \sqrt{a+b \tan (c+d x)} \left (\frac{1}{2} a (7 A b+4 a B)-2 \left (a^2 A-A b^2-2 a b B\right ) \tan (c+d x)-\frac{1}{2} b (a A-4 b B) \tan ^2(c+d x)\right ) \, dx\\ &=-\frac{a (7 A b+4 a B) \cot (c+d x) \sqrt{a+b \tan (c+d x)}}{4 d}-\frac{a A \cot ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{2 d}+\frac{1}{2} \int \frac{\cot (c+d x) \left (-\frac{1}{4} a \left (8 a^2 A-15 A b^2-20 a b B\right )-2 \left (3 a^2 A b-A b^3+a^3 B-3 a b^2 B\right ) \tan (c+d x)-\frac{1}{4} b \left (9 a A b+4 a^2 B-8 b^2 B\right ) \tan ^2(c+d x)\right )}{\sqrt{a+b \tan (c+d x)}} \, dx\\ &=-\frac{a (7 A b+4 a B) \cot (c+d x) \sqrt{a+b \tan (c+d x)}}{4 d}-\frac{a A \cot ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{2 d}+\frac{1}{2} \int \frac{-2 \left (3 a^2 A b-A b^3+a^3 B-3 a b^2 B\right )+2 \left (a^3 A-3 a A b^2-3 a^2 b B+b^3 B\right ) \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx-\frac{1}{8} \left (a \left (8 a^2 A-15 A b^2-20 a b B\right )\right ) \int \frac{\cot (c+d x) \left (1+\tan ^2(c+d x)\right )}{\sqrt{a+b \tan (c+d x)}} \, dx\\ &=-\frac{a (7 A b+4 a B) \cot (c+d x) \sqrt{a+b \tan (c+d x)}}{4 d}-\frac{a A \cot ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{2 d}-\frac{1}{2} \left ((a-i b)^3 (i A+B)\right ) \int \frac{1+i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx+\frac{1}{4} \left (-2 \left (3 a^2 A b-A b^3+a^3 B-3 a b^2 B\right )+2 i \left (a^3 A-3 a A b^2-3 a^2 b B+b^3 B\right )\right ) \int \frac{1-i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx-\frac{\left (a \left (8 a^2 A-15 A b^2-20 a b B\right )\right ) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+b x}} \, dx,x,\tan (c+d x)\right )}{8 d}\\ &=-\frac{a (7 A b+4 a B) \cot (c+d x) \sqrt{a+b \tan (c+d x)}}{4 d}-\frac{a A \cot ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{2 d}+\frac{\left ((a-i b)^3 (A-i B)\right ) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 d}+\frac{\left ((a+i b)^3 (A+i B)\right ) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 d}-\frac{\left (a \left (8 a^2 A-15 A b^2-20 a b B\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{4 b d}\\ &=\frac{\sqrt{a} \left (8 a^2 A-15 A b^2-20 a b B\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{4 d}-\frac{a (7 A b+4 a B) \cot (c+d x) \sqrt{a+b \tan (c+d x)}}{4 d}-\frac{a A \cot ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{2 d}-\frac{\left (i (a+i b)^3 (A+i B)\right ) \operatorname{Subst}\left (\int \frac{1}{-1+\frac{i a}{b}-\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{b d}+\frac{\left ((a-i b)^3 (i A+B)\right ) \operatorname{Subst}\left (\int \frac{1}{-1-\frac{i a}{b}+\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{b d}\\ &=\frac{\sqrt{a} \left (8 a^2 A-15 A b^2-20 a b B\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )}{4 d}-\frac{(a-i b)^{5/2} (A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d}-\frac{(a+i b)^{5/2} (A+i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d}-\frac{a (7 A b+4 a B) \cot (c+d x) \sqrt{a+b \tan (c+d x)}}{4 d}-\frac{a A \cot ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{2 d}\\ \end{align*}

Mathematica [B]  time = 2.34958, size = 448, normalized size = 2.04 \[ -\frac{-\sqrt{a} \left (8 a^2 A-20 a b B-15 A b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a}}\right )+4 a^2 A \sqrt{a+i b} \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )+2 a^2 A \cot ^2(c+d x) \sqrt{a+b \tan (c+d x)}+4 i a^2 B \sqrt{a+i b} \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )+4 a^2 B \cot (c+d x) \sqrt{a+b \tan (c+d x)}-4 A b^2 \sqrt{a+i b} \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )+4 (a-i b)^{5/2} (A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )+8 i a A b \sqrt{a+i b} \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )+9 a A b \cot (c+d x) \sqrt{a+b \tan (c+d x)}-4 i b^2 B \sqrt{a+i b} \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )-8 a b B \sqrt{a+i b} \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{4 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^3*(a + b*Tan[c + d*x])^(5/2)*(A + B*Tan[c + d*x]),x]

[Out]

-(-(Sqrt[a]*(8*a^2*A - 15*A*b^2 - 20*a*b*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a]]) + 4*(a - I*b)^(5/2)*(A
- I*B)*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]] + 4*a^2*A*Sqrt[a + I*b]*ArcTanh[Sqrt[a + b*Tan[c + d*x]
]/Sqrt[a + I*b]] + (8*I)*a*A*Sqrt[a + I*b]*b*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a + I*b]] - 4*A*Sqrt[a + I*
b]*b^2*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a + I*b]] + (4*I)*a^2*Sqrt[a + I*b]*B*ArcTanh[Sqrt[a + b*Tan[c +
d*x]]/Sqrt[a + I*b]] - 8*a*Sqrt[a + I*b]*b*B*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a + I*b]] - (4*I)*Sqrt[a +
I*b]*b^2*B*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a + I*b]] + 9*a*A*b*Cot[c + d*x]*Sqrt[a + b*Tan[c + d*x]] + 4
*a^2*B*Cot[c + d*x]*Sqrt[a + b*Tan[c + d*x]] + 2*a^2*A*Cot[c + d*x]^2*Sqrt[a + b*Tan[c + d*x]])/(4*d)

________________________________________________________________________________________

Maple [C]  time = 2.441, size = 128221, normalized size = 582.8 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^3*(a+b*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3*(a+b*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3*(a+b*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**3*(a+b*tan(d*x+c))**(5/2)*(A+B*tan(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3*(a+b*tan(d*x+c))^(5/2)*(A+B*tan(d*x+c)),x, algorithm="giac")

[Out]

Timed out